From 160d895b13cd3e124c5f27ace8442350e101d6d7 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 20 Feb 2007 22:54:30 +0000 Subject: [PATCH] Added host.supported_bootloaders field. Signed-off-by: Ewan Mellor --- docs/xen-api/xenapi-datamodel.tex | 33 +++++++++++++++++++++++++++++++ tools/python/xen/xend/XendAPI.py | 8 ++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index c897baa3a8..82c3bea252 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -4424,6 +4424,7 @@ $\mathit{RW}$ & {\tt name/label} & string & a human-readable name \\ $\mathit{RW}$ & {\tt name/description} & string & a notes field containg human-readable description \\ $\mathit{RO}_\mathit{run}$ & {\tt software\_version} & (string $\rightarrow$ string) Map & version strings \\ $\mathit{RW}$ & {\tt other\_config} & (string $\rightarrow$ string) Map & additional configuration \\ +$\mathit{RO}_\mathit{run}$ & {\tt supported\_bootloaders} & string Set & a list of the bootloaders installed on the machine \\ $\mathit{RO}_\mathit{run}$ & {\tt resident\_VMs} & (VM ref) Set & list of VMs currently resident on host \\ $\mathit{RW}$ & {\tt logging} & (string $\rightarrow$ string) Map & logging configuration \\ $\mathit{RO}_\mathit{run}$ & {\tt PIFs} & (PIF ref) Set & physical network interfaces \\ @@ -4949,6 +4950,38 @@ void +\vspace{0.3cm} +\vspace{0.3cm} +\vspace{0.3cm} +\subsubsection{RPC name:~get\_supported\_bootloaders} + +{\bf Overview:} +Get the supported\_bootloaders field of the given host. + + \noindent {\bf Signature:} +\begin{verbatim} (string Set) get_supported_bootloaders (session_id s, host ref self)\end{verbatim} + + +\noindent{\bf Arguments:} + + +\vspace{0.3cm} +\begin{tabular}{|c|c|p{7cm}|} + \hline +{\bf type} & {\bf name} & {\bf description} \\ \hline +{\tt host ref } & self & reference to the object \\ \hline + +\end{tabular} + +\vspace{0.3cm} + + \noindent {\bf Return Type:} +{\tt +string Set +} + + +value of the field \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 9133a0754e..277ef3b4c0 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -626,7 +626,8 @@ class XendAPI(object): host_attr_ro = ['software_version', 'resident_VMs', 'host_CPUs', - 'metrics'] + 'metrics', + 'supported_bootloaders'] host_attr_rw = ['name_label', 'name_description', @@ -678,6 +679,8 @@ class XendAPI(object): return xen_api_success(XendNode.instance().get_host_cpu_refs()) def host_get_metrics(self, _, ref): return xen_api_success(XendNode.instance().host_metrics_uuid) + def host_get_supported_bootloaders(self, session, host_ref): + return xen_api_success(['pygrub']) # object methods def host_disable(self, session, host_ref): @@ -707,7 +710,8 @@ class XendAPI(object): 'software_version': node.xen_version(), 'resident_VMs': dom.get_domain_refs(), 'host_CPUs': node.get_host_cpu_refs(), - 'metrics': node.host_metrics_uuid} + 'metrics': node.host_metrics_uuid, + 'supported_bootloaders': 'pygrub'} return xen_api_success(record) # class methods -- 2.30.2